<div class="food_lead">
	<div class="bootstrapiso shit">
		<ul class="nav nav-tabs" style="border-bottom-style: none">
			<li class="nav-item">
				<a class="nav-link" data-toggle="tab" href="#all">全部商家</a>
			</li>
			<li class="nav-item" >
				<a class="nav-link" data-toggle="tab" href="#yummy">美食</a>
			</li>
			<li class="nav-item">
				<a class="nav-link" data-toggle="tab" href="#junkfood">快餐便当</a>
			</li>
			<li class="nav-item">
				<a class="nav-link" data-toggle="tab" href="#special">特色菜系</a>
			</li>
			<li class="nav-item">
				<a class="nav-link" data-toggle="tab" href="#global">全球美食</a>
			</li>
			<li class="nav-item">
				<a class="nav-link" data-toggle="tab" href="#night">小吃夜宵</a>
			</li>
			<li class="nav-item">
				<a class="nav-link" data-toggle="tab" href="#sweety">甜品饮食</a>
			</li>
			<li class="nav-item">
				<a class="nav-link" data-toggle="tab" href="#breakfast">早餐</a>
			</li>
		</ul>
		<div class="tab-content">
			<div class="tab-pane fade" id="all"></div>
			<div class="tab-pane fade" id="yummy">
				<ul class="nav nav-pills">
					<li class="nav-item">
						<a class="nav-link active" href="#">小吃炸串</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#">地方菜系</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#">简餐便当</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#">香锅冒菜</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#">汉堡披萨</a>
					</li>
				</ul>
			</div>
			<div class="tab-pane fade" id="junkfood">
				<ul class="nav nav-pills">
					<li class="nav-item">
						<a class="nav-link active" href="#">凌一舟</a>
					</li>
				</ul>
			</div>
			<div class="tab-pane fade" id="special">
				<ul class="nav nav-pills">
					<li class="nav-item">
						<a class="nav-link active" href="#">凌一舟</a>
					</li>
				</ul>
			</div>
			<div class="tab-pane fade" id="global">
				<ul class="nav nav-pills">
					<li class="nav-item">
						<a class="nav-link active" href="#">凌一舟</a>
					</li>
				</ul>
			</div>
			<div class="tab-pane fade" id="night">
				<ul class="nav nav-pills">
					<li class="nav-item">
						<a class="nav-link active" href="#">凌一舟</a>
					</li>
				</ul>
			</div>
			<div class="tab-pane fade" id="sweety">
				<ul class="nav nav-pills">
					<li class="nav-item">
						<a class="nav-link active" href="#">凌一舟</a>
					</li>
				</ul>
			</div>
			<div class="tab-pane fade" id="breakfast">
				<ul class="nav nav-pills">
					<li class="nav-item">
						<a class="nav-link active" href="#">凌一舟</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>

<div class="wrapper">
	{foreach $merchants as $merchant}
	<a href="{$base_url.base_url}diner/shop/{$merchant->id}" class="mera">
		<div class="merblock">
			<div class="merlog">
				<img src="{$base_url.base_url}application/views/templates/merchant/upload/{$merchant->id}/icon.png" class="merlog-icon"
					 onerror="this.src='{$base_url.base_url}application/views/templates/merchant/upload/default.png';this.onerror=null">
				<span>30分钟</span>
			</div>
			<div class="mer-content">
				<div class="mer-title">{$merchant->mname}</div>
				<div>
					{for $i=1 to $merchant->star}
						<img src="{$base_url.base_url}application/views/templates/diner/assets/images/star.svg">
					{/for}
					{for $i=1 to 5-$merchant->star}
						<img src="{$base_url.base_url}application/views/templates/diner/assets/images/whitestar.svg">
					{/for}
				</div>
				<div class="mer-activity">
					<i class="mer-pic">保</i>
				</div>
			</div>
		</div>
	</a>
	{/foreach}
</div>
<script src="{$base_url.base_url}application/views/templates/js/jquery.min.js"></script>
<script src="{$base_url.base_url}application/views/templates/js/popper.min.js"></script>
<script src="{$base_url.base_url}application/views/templates/js/bootstrap.min.js"></script>
<script>
	$(window).bind("load resize", function () {
		if ($(window).width() < 1220) {
			$(".wrapper").css("width", "900px")
		}
		if ($(window).width() > 1210) {
			$(".wrapper").css("width", "1200px")
		}
		$(".food_lead").css("width", $(".wrapper").width())
	});
	$(document).ready(function () {
		$(".nav-tabs").children("li").click(function () {
			if ($(this).children("a").attr("href") === "#all") {
				$(this).children('a').css("background-color", "#0089dc")
			} else {
				$(".nav-tabs").children("li").children("a").css("background-color", "white");
				$(this).find('a').css("background-color", "#f7f7f7")
			}
		})
	})
</script>
</body>

</html>
